#include "dwgrectangle.h"

DwgRectangle::DwgRectangle(QObject *parent)
    : DwgObject{parent}
{}
void DwgRectangle::SetData(QPoint pt1, QPoint pt2)
{
    mStartPt = pt1;
    mwidth = pt2.x() - pt1.x();
    mheight = pt2.y() - pt1.y();
}
void DwgRectangle::Draw(QPainter *painter)
{
    painter->drawRect(mStartPt.x(),mStartPt.y(),mwidth,mheight);
}
